#!/bin/sh
echo "正在获取最新的host"
echo "https://github.com/racaljk/hosts.git"
basepath=$(cd `dirname $0`; pwd)
echo $basepath
cd $basepath
git clone https://github.com/racaljk/hosts.git
echo "正在合并hosts"
cat localhost hosts/hosts > tmphosts
echo "正在复制host到etc目录"
cp tmphosts /etc/hosts
echo "复制成功"